<?php
/**
 * Created by PhpStorm.
 * User: qv
 * Date: 2018/7/19 0019
 * Time: 18:38
 */
//include_once __DIR__ . '/wchat/common/Progaram.php';
//include_once __DIR__ . '/wchat/common/Miniprogarampage.php';
//include_once __DIR__ . '/wchat/common/Help.php';
//include_once __DIR__ . '/wchat/common/Config.php';
//include_once __DIR__ . '/wchat/common/Result.php';
//include_once __DIR__ . '/wchat/common/HttpClient.php';
//include_once __DIR__ . '/wchat/qq/SmallProgram.php';
//include_once __DIR__ . '/wchat/base/Template.php';
//include_once __DIR__ . '/wchat/qq/Template.php';

require_once __DIR__ . '/vendor/autoload.php';

use wchat\common\HttpClient;

\Swoole\Coroutine::create(function () {
	$data = '{"id":"681133","username":"","nickname":"????  闫   ????","openId":"ovnGZ5cj4GtvTeaRZqxYtTwp4lCc","gzhOpenId":"null","phone":"","email":"","password":"","server":0,"xcx_server":0,"unionID":"","avatar":"https:\/\/wx.qlogo.cn\/mmopen\/vi_32\/mGkblm7Ffz4o0prJKnqysoicFWYmwk2YzDqGecsAA10a1QSsRDEH70IserwXKBVMSjBHCaq7Z8YIeccXEHJt9lw\/132","sex":2,"city":"Shijiazhuang","province":"Hebei","country":"China","createTime":1530404031,"modifyTime":1530404048,"lastSeetime":0,"status":1,"groupId":0}';

	var_dump(PHP_LIBDIR, PHP_CONFIG_FILE_SCAN_DIR);

	$config = new \wchat\common\Config();
	$config->setAppid('1110444685');
	$config->setAppsecret('XTK81p7WS0PqWjiF');
	$config->setUsrSwoole(true);
	$config->setAccessToken('g3JqSiACJQuYuE7Hz683mz5oAi8aYuUktCc2C3a92IeB0_Kx9E92tJTtRQVUBAbucCSt');

	/** @var \wchat\qq\SecCheck $model */
	$model = \wchat\qq\SecCheck::getInstance($config);
	var_dump($model->text('德生科技还是看得见粉红色的空间'));

//	$json = json_decode($data, true);
//
//	var_dump($json);

});
